The arguments are as follows:void setgiovector(int level, int slot, void (*func)(__psint_t, struct eframe_s *), __psint_t arg);
level | The interrupt level; must be GIO_INTERRUPT_1 for all devices except the graphics board. |
slot | The slot number, 0 or 1. |
func | The address of the interrupt handling function (typically the pfxintr() entry point of the device driver), or else NULL to unregister. |
arg | A "pointer-sized integer" value to be passed as the first argument of the interrupt handler when it is invoked. |
Note: If either the level or slot number is out of range, setgiovector() issues an error message with the CE_PANIC level, causing a kernel panic. When func is not NULL, the specified function is registered to receive interrupts at the given level from the given slot. When an interrupt occurs, the function is called with two arguments. The first is the value specified as arg, a "pointer-sized integer," typically the address of device-specific information. The second is the interrupt registers. The structure eframe_s is declared in sys/reg.h. However, this structure is of no interest.
This function can be used with a NULL for the func argument to unregister an interrupt routine that was previously registered. You must unregister an interrupt handler in a loadable device driver prior to unloading, when called at the pfxunload() entry point (see "Entry Point unload()").
The arguments are as follows:void setgioconfig(int slot, int flags);
slot | The slot number, 0 or 1. |
flags | A set of bit-flags from the constants GIO_ARB_* declared in sys/mc.h. |
Note: If the slot number is out of range, setgioconfig() either issues an error message with the CE_PANIC level or suffers an assertion failure, causing a kernel panic. The flags that can be combined to make the flags argument are
GIO64_ARB_EXP0_SIZE_64 | Configure for 64-bit transfers; otherwise transfers will be 32-bit. |
GIO64_ARB_EXP0_RT | Configure as a real-time device; otherwise it will be a long burst device. |
GIO64_ARB_EXP0_MST | Configure as a bus master; otherwise it will be a slave. |
GIO64_ARB_EXP0_PIPED | Configure slot as a pipelined device, otherwise it will be a non-pipelined device. For Indigo2 systems, this must be set. |